# Set the base image to Ubuntu
FROM    node:lts-alpine3.19

# File Author / Maintainer
# MAINTAINER Anand Mani Sankar

# Install Node.js and other dependencies
# RUN apt-get update && \
#     apt-get -y install curl && \
#     curl -sL https://deb.nodesource.com/setup | sudo bash - && \
#     apt-get -y install python build-essential nodejs

# Install nodemon
# RUN npm install -g nodemon

# Provides cached layer for node_modules
# ADD package.json /tmp/package.json
# RUN cd /tmp && npm install
# RUN mkdir -p /src && cp -a /tmp/node_modules /src/

ADD . /code

WORKDIR /code

RUN npm install


# Define working directory
# WORKDIR /src
# ADD . /src

# Expose port
EXPOSE  8080

# Run app using nodemon
CMD ["node", "index.js"]
